import request from 'src/utils/request';

const repository = 'member/';
export default {
    join(code, classify) {
        return request({
            url: repository + 'join',
            method: 'GET',
            params: {
                code,
                classify
            }
        });
    },
    joinTest(code, classify) {
        return request({
            url: repository + 'joinTest',
            method: 'GET',
            params: {
                code,
                classify
            }
        });
    },
    listOpen(classify) {
        return request({
            url: repository + 'listOpen',
            method: 'GET',
            params: {
                classify
            }
        });
    },
    listAll(classify) {
        return request({
            url: repository + 'listAll',
            method: 'GET',
            params: {
                classify
            }
        });
    },
    /**
     * @param no 奖项
     * @param classify 批次
     */
    open(no, classify) {
        return request({
            url: repository + 'open',
            method: 'GET',
            params: {
                no,
                classify
            }
        });
    },
    remove(id) {
        return request({
            url: repository + 'delete',
            method: 'POST',
            params: {
                id
            }
        });
    }
};

